
		***********************************
		***********************************
		**** Omer Yair & Dan Miodownik ****
		******* Youth Bulge Paper *********
		******** Regression Codes *********
		***********************************		
		***********************************



				******************
				******************
				** Paper Tables **
				******************
				******************


********************************************************
** Table 2 - Determinants of Onset of All Civil Wars  **
********************************************************

** Regression of Model 1 in Table 2: Determinants of Onset of All Civil Wars in Sambanis's Coding (GDP per capita)
logit Samb_CW_Onset YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_Sam , robust

* Regression of Model 2 in Table 2: Determinants of Onset of All Civil Wars in Sambanis's Coding (IMR)
logit Samb_CW_Onset  YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_Sam , robust

** Regression of Model 3 in Table 2: Determinants of Onset of All Civil Wars in WCM's Coding (GDP per capita)
logit WCM_CW_Onset YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_WCM , robust

* Regression of Model 4 in Table 2: Determinants of Onset of All Civil Wars in WCM's Coding (IMR)
logit WCM_CW_Onset YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln  peaceyears_WCM , robust

** Regression of Model 5 in Table 2: Determinants of Onset of All Civil Wars in FL's Coding (GDP per capita)
logit FL2003_CW_Onset YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_FL , robust

* Regression of Model 6 in Table 2: Determinants of Onset of All Civil Wars in FL's Coding (IMR)
logit FL2003_CW_Onset YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_FL , robust


*************************************************************
** Table 3 - Determinants of Onset of Non-ethnic Civil War **
*************************************************************

** Regression of Model 1 in Table 3: Determinants of Onset of Non-ethnic Civil War in Sambanis's Coding (GDP per capita)
logit  Samb_nonethnic_01  YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_Sam if   Samb_ethnic_01!=1, robust

** Regression of Model 2 in Table 3: Determinants of Onset of Non-ethnic Civil War in Sambanis's Coding (IMR)
logit  Samb_nonethnic_01  YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_Sam if   Samb_ethnic_01!=1, robust

** Regression of Model 3 in Table 3: Determinants of Onset of Non-ethnic Civil War in WCM's Coding (GDP per capita)
logit  WCM_nonethnic_01  YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_WCM if  WCM_ethnic_01!=1, robust

** Regression of Model 4 in Table 3: Determinants of Onset of Non-ethnic Civil War in WCM's Coding (IMR)
logit  WCM_nonethnic_01  YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_WCM if  WCM_ethnic_01!=1, robust

** Regression of Model 5 in Table 3: Determinants of Onset of Non-ethnic Civil War in FL's Coding (GDP per capita)
logit   FL2003_nonethnic_01  YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_FL if    Fl2003_ethnic_01!=1, robust

** Regression of Model 6 in Table 3: Determinants of Onset of Non-ethnic Civil War in FL's Coding (IMR)
logit   FL2003_nonethnic_01  YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_FL if  Fl2003_ethnic_01!=1, robust


*********************************************************
** Table 4 - Determinants of Onset of Ethnic Civil War **
*********************************************************

** Regression of Model 1 in Table 4: Determinants of Onset of Ethnic Civil War in Sambanis's Coding (GDP per capita)
logit  Samb_ethnic_01 YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_Sam if   Samb_nonethnic_01!=1, robust

** Regression of Model 2 in Table 4: Determinants of Onset of Ethnic Civil War in Sambanis's Coding (IMR)
logit  Samb_ethnic_01 YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_Sam if   Samb_nonethnic_01!=1, robust

** Regression of Model 3 in Table 4: Determinants of Onset of Ethnic Civil War in WCM's Coding (GDP per capita)
logit  WCM_ethnic_01 YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln  peaceyears_WCM if  WCM_nonethnic_01!=1,robust

** Regression of Model 4 in Table 4: Determinants of Onset of Ethnic Civil War in WCM's Coding (IMR)
logit  WCM_ethnic_01 YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln  peaceyears_WCM  if  WCM_nonethnic_01!=1, robust

** Regression of Model 5 in Table 4: Determinants of Onset of Ethnic Civil War in FL's Coding (GDP per capita)
logit  Fl2003_ethnic_01 YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_FL if   FL2003_nonethnic_01!=1, robust

** Regression of Model 6 in Table 4: Determinants of Onset of Ethnic Civil War in FL's Coding (IMR)
logit  Fl2003_ethnic_01 YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln  peaceyears_FL if   FL2003_nonethnic_01!=1, robust





				***********************
				***********************
				** Robustness Checks **
				***********************
				***********************

				
************************************************************************************************************************
**  Tables 1 & 2 - Determinants of Onset of Non-ethnic and Ethnic Armed Conflicts, with YB measure of males aged 15-24 **
************************************************************************************************************************

*** Instruction for replication: 
*** write down the regression codes for the equivalent Model from Tables 3 or 4 in the main text, 
*** and replace the variable YB_15_29 with the variable YB_15_24. 
			

*******************************************************************************************************************
**  Tables 3 & 4 - Determinants of Onset of Non-ethnic and Ethnic Armed Conflicts, with Urdal's (2006) YB measure **
*******************************************************************************************************************

*** Instruction for replication:
*** write down the regression codes for the equivalent Model from Table 3 or 4 in the main text, 
*** and replace the variable YB_15_29 with the variable YB_Urdal_AP. 
			
*****************************************************************************************************************
**  Tables 5 & 6 - Determinants of Onset of Non-ethnic and Ethnic Armed Conflicts, with a growth rate measure **
*****************************************************************************************************************

*** Instruction for replication: 
*** write down the regression codes for the equivalent Model from Table 3 or 4 in the main text, 
*** and then add a growth rate measure based on the grwt_rt_gdp_wcm*100 variable.
*** we created this variable:
*** gen growth_rate= grwt_rt_gdp_wcm*100
*** and used it as our growth rate measure.

		
*********************************************************************************************************************
**  Tables 7 & 8 - Determinants of Onset of Non-ethnic and Ethnic Armed Conflicts, with raw GDP per capita measure **
*********************************************************************************************************************

*** Instruction for replication: 
*** write down the regression codes for the equivalent Model from Table 3 or 4 in the main text (only the Models with the GDP per capita), 
*** and replace the variable Ln_GDP_WCM1000 with the variable gdp_wcm1000 (we created a variable that divided this variable by 1000).


*********************************************************************************************************************
**  Tables 9 & 10 - Determinants of Onset of Non-ethnic and Ethnic Armed Conflicts, with raw GDP per capita measure **
*********************************************************************************************************************

*** Instruction for replication: 
*** write down the regression codes for the equivalent Model from Table 3 or 4 in the main text, 
*** and replace the variable Anocracy5 with the variable Anocracy6.


******************************************************************************************
** Tables 11 & 12 - Determinants of Onset of Ethnic Civil War, with Dummies for decades **
******************************************************************************************

*** Instruction for replication: 
*** write down the regression codes for the equivalent Model from Tables 3 or 4 in the main text, 
*** and add the variables The_Sixsties The_Seventies The_Eighties The_Nineties. 


********************************************************************************************
** Tables 13 & 14 - Determinants of Onset of Ethnic Civil War, with natural cubic splines **
********************************************************************************************

*** Instruction for replication: 
*** write down the regression codes for the equivalent Model from Tables 3 or 4 in the main text, 
*** and add the variables spline1_Samb spline2_Samb spline3_Samb to the Sambanis-based models,
*** the variables spline1_WCM spline2_WCM spline3_WCM to the WCM-based modesl,
*** and the variables spline1_FL spline2_FL spline3_FL to the FL-based models.


***************************************************************************************************
** Tables 15 & 16 - Determinants of Onset of Ethnic Civil War, with additional control variables **
**************************************************************************************************

*** Instruction for replication: 
*** write down the regression codes for the equivalent Model from Tables 3 or 4 in the main text, 
*** and add the variables ELF Oil_Exp P_Inst Mount_Ln Newstate.


***************************************************************************************************
** Table 17 - Determinants of Onset of Non-ethnic and Ethnic armed conflicts, with additional control variables **
**************************************************************************************************

** Model 1 in Table 17: Determinants of Onset of Non-ethnic Armed Conflicts in WCM's Coding (GDP per capita)
logit   WCM_nonethnic_AC YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_WCM_AC if   WCM_ethnic_AC!=1, robust

** Model 2 in Table 17: Determinants of Onset of Non-ethnic Armed Conflicts in WCM's Coding (IMR)
logit   WCM_nonethnic_AC YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_WCM_AC if   WCM_ethnic_AC!=1, robust

** Model 3 in Table 17: Determinants of Onset of Ethnic Armed Conflicts in WCM's Coding (GDP per capita)
logit   WCM_ethnic_AC YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_WCM_AC if   WCM_nonethnic_AC!=1, robust

** Model 4 in Table 18: Determinants of Onset of Ethnic Armed Conflicts in WCM's Coding (IMR)
logit   WCM_ethnic_AC YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_WCM_AC if  WCM_nonethnic_AC!=1, robust



**********************************************************************************************
** Tables 18 & 19 - Determinants of Onset of Ethnic Civil War, with country-clustered SE's  **
**********************************************************************************************

*** Instruction for replication: 
*** write down the regression codes for the equivalent Model from Tables 3 or 4 in the main text, 
*** and instead of writing "robust" at the command's end, write "cluster ( Coun_Code)".


**********************************************************************************************************
** Tables 20 & 21 - Determinants of Onset of Ethnic Civil War, with Rare Events Data Estimation Method  **
**********************************************************************************************************

*** Instruction for replication: 
*** after installing the relogit.ado from King and Zeng, write down the regression codes for the equivalent Model from Tables 3 or 4 in the main text, 
*** and instead of writing "logit" at the begining write "relogit" (and use country-clustered SE's).


***********************************************************************************************************************
** Tables 22 & 23 - Determinants of Onset of Ethnic Civil War, with youth bulge measures across space and over time  **
***********************************************************************************************************************

*** Instruction for replication: 
*** write down the regression codes for the equivalent Model from Tables 3 or 4 in the main text, 
*** and replace the variable YB_15_29 with the variables YB_15_29_AC YB_15_29_AT. 

						
***********************************************************************************************
** Table 24 - Determinants of Onset of Non-ethnic and Ethnic Civil War, the "Narrow" dataset **
***********************************************************************************************

** Model 1 in Table 24: Determinants of Onset of Non-ethnic Civil War (GDP per capita)
logit Samb_minus_another_nonethnic_CW YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_samb_minus_one if   Samb_minus_another_ethnic_CW!=1, robust

** Model 2 in Table 24: Determinants of Onset of Non-ethnic Civil War (IMR)
logit Samb_minus_another_nonethnic_CW YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_samb_minus_one if   Samb_minus_another_ethnic_CW!=1, robust

** Model 3 in Table 24: Determinants of Onset of Ethnic Civil War (GDP per capita)
logit Samb_minus_another_ethnic_CW YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_samb_minus_one if   Samb_minus_another_nonethnic_CW!=1, robust

** Model 4 in Table 24: Determinants of Onset of Ethnic Civil War (IMR)
logit Samb_minus_another_ethnic_CW YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_samb_minus_one if   Samb_minus_another_nonethnic_CW!=1, robust


************************************************************************************************
** Table 25 - Determinants of Onset of Non-ethnic and Ethnic Civil War, the "Matched" dataset **
************************************************************************************************

** Model 1 in Table 25: Determinants of Onset of Non-ethnic Civil War (GDP per capita)
logit cleaned_CW_List_nonethnic  YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_cleaned if   cleaned_CW_List_ethnic !=1, robust

** Model 2 in Table 25: Determinants of Onset of Non-ethnic Civil War in the "cleaned" data (IMR)
logit cleaned_CW_List_nonethnic  YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_cleaned if   cleaned_CW_List_ethnic !=1, robust

** Model 3 in Table 25: Determinants of Onset of Ethnic Civil War in the "cleaned" data (GDP per capita)
logit cleaned_CW_List_ethnic  YB_15_29 Ln_GDP_WCM1000 Anocracy5 Exld_Pop Pop_Ln peaceyears_cleaned if   cleaned_CW_List_nonethnic !=1, robust

** Model 4 in Table 25: Determinants of Onset of Ethnic Civil War in the "cleaned" data (IMR)
logit cleaned_CW_List_ethnic  YB_15_29 IMR Anocracy5 Exld_Pop Pop_Ln peaceyears_cleaned if   cleaned_CW_List_nonethnic !=1, robust
